package com.itheima.overload;

public class MothodTest2 {
    public static void main(String[] args) {
        //方法重载
        fire();
        fire("日本");
        fire("美国",10);
    }
    public static void fire(){
        fire("岛国");
    }
    public static void fire(String country){
        fire(country,10);    }
    public static void fire(String country,int num){
        System.out.println("发射了"+num+"枚武器给"+country);
    }
}
